package by.semerikov.parts;

public class Date {
	private int day;
	 static String[] months = {"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DES"};
	private int month;
	private int year;
	private int hour;
	private int minute;
	private int second;
	
	public Date()
	{
		
	}
	public Date(int day,int mon,int year,int hour,int min,int sec)
	{
		this.day = day;
		this.month = mon;
		this.year = year;
		this.hour = hour;
		this.minute = min;
		this.second = sec;
	}
	
	@Override
	public String toString()
	{
		String resultStr = "";
		resultStr += day+"/"+
		month +"/"+
		year +":"+
		hour+":"+
		minute+":"+
		second;
		return resultStr;
	
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	public static String[] getMonths() {
		return months;
	}
	public static void setMonths(String[] months) {
		Date.months = months;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public void setMonth(String month) {
		for(int i = 0 ; i < months.length ; i++)
		{
			if(months[i].equals(month))
			{
				setMonth(i);
				break;
			}
		}
	}
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public Integer getHour() {
		return hour;
	}
	public void setHour(int hour) {
		this.hour = hour;
	}
	public int getMinute() {
		return minute;
	}
	public void setMinute(int minute) {
		this.minute = minute;
	}
	public int getSecond() {
		return second;
	}
	public void setSecond(int second) {
		this.second = second;
	}
	
	
}
